package tech.yunland.shop.domain.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.moyuer.bsf.domain.model.AbstractEntity;
import org.hibernate.validator.constraints.Range;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by v on 17-6-29.
 */
@Entity
@Table(name = "lessons")
public class Lessons extends AbstractEntity {

    @Column
    private String lname;  //课程名称

    @Column(nullable = false)
    private Integer state = 0; // 课程类型 0 选修 1 必修

    @JSONField(format = "yyyy-MM-dd hh:mm:ss")
    @Column(name = "create_time",nullable = false)
    private Date createTime = new Date();

    public String getLname() {
        return lname;
    }

    public void setLname(String lname) {
        this.lname = lname;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
